1. Field of the Invention
The present invention relates to a method for generating a musical file and, more particularly, to a method for generating time field and event field of a musical file, in the form of the formats of time field and event field of MIDI (Music Instrument Digital Interface), and playing the musical file, and a computer-readable media storing the musical file.
2. Description of Related Art
Among digital music playback techniques, MIDI file format is a very popular standard. MIDI file format can be divided into SMF (standard MIDI format) and SMAF (synthetic music mobile application format). As shown in FIG. 1, SMF includes a time field 11, a status field 12 and a data field 13. The time field 11 is provided to record relative time. The status field 12 is provided to record status of musical parts. The data field 13 is provided to record musical data. A musical record includes a time field, a status field and a data field. An SMF file includes at least two musical records.
SMAF is standardized for portable electronics by YAMAHA cooperation; for example, a cell phone provides 20 chords in SMAF. As shown in FIG. 2, SMAF can be divided into a time field 21 and an event field 22. The time field 21 is provided to record relative time. The event field 22 is provided to record music playback events. The event field 22 can be regarded as a combined and simplified content of the status field 12 and data field 13. Thus, a musical record includes a time field 21 and an event field 22. An SMAF file includes at least two musical records. By comparison, it is obvious that using SMAF format can possess a file length less than using SMF format.
Also, from the afirementioned SMF and SMAF files respectively shown in FIGS. 1 and 2, it is known that, if more musical parts are played at a same time, more time fields are contained at the same time, thus wasting more memory space for such a file. Accordingly, the use of portable electronics that only have limited memory is not satisfactory. Therefore, it is desirable to provide an improved method to mitigate and/or obviate the aforementioned problems.